package app.common.utils.cjt.ao;

import com.alibaba.fastjson.JSON;
import lombok.Data;

import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
import java.util.TreeMap;

/**
 * wms.stocktransfer.Edit.createOrder（调拨单新建）
 * @author feizns
 * @since 2023/3/21
 */
@Data
public class WmsStocktransferEditCreateOrderAo {

    private String from_warehouse_no;
    private String to_warehouse_no;
    private Integer mode;
    private String outer_no;
    private Integer num;
    private String spec_no;
    private String remark;

    public Map<String, Object> toSubMap() {
        Map<String, Object> map = new TreeMap<>();
        map.put("num",num );
        map.put("spec_no",spec_no );
        map.put("remark",remark );
        return map;
    }

    public Map<String, Object> toMap() {
        Map<String, Object> map = new TreeMap<>();
        map.put("from_warehouse_no",from_warehouse_no );
        map.put("to_warehouse_no",to_warehouse_no );
        map.put("mode",mode );
        map.put("outer_no",outer_no );
        return map;
    }
    public String toData() {
        return JSON.toJSONString(Arrays.asList(toMap(), Collections.singletonList(toSubMap()), true));
    }

}
